<template>
  <div>
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="实体信息" name="entity">
        <entity-form></entity-form>
      </el-tab-pane>
      <el-tab-pane label="实体属性" name="entityProperty" v-if="enityId">
        <entity-property-manage></entity-property-manage>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import entityForm from './entityForm'
import entityPropertyManage from '../entityProperty/entityPropertyManage'
export default {
  name: 'EntityInfo',
  components: {
    entityForm,
    entityPropertyManage
  },
  data() {
    return {
      enityId: null,
      activeName: 'entity'
    }
  },
  mounted() {
    if (this.$route.query && Object.keys(this.$route.query).length > 0) {
      this.enityId = this.$route.query.id
    }
  },
  methods: {
    handleClick(tab, event) {
    }
  }
}
</script>

<style lang="scss" scoped>
.el-tabs {
  padding: 10px;
  margin: 0 auto;
  max-width: 900px;
}
</style>

